﻿using System;
using System.Windows;
using System.Windows.Media;

namespace LpbPrj.Client.Controls;

/// <summary>
/// VideoOptAttach
/// </summary>
public class VideoOptAttach
{
    /// <summary>
    /// 播放按钮图片
    /// </summary>
    public static readonly DependencyProperty PlayImageSourceProperty = DependencyProperty.RegisterAttached(
        "PlayImageSource", typeof(ImageSource), typeof(VideoOptAttach), new FrameworkPropertyMetadata(default(ImageSource), FrameworkPropertyMetadataOptions.Inherits));
    public static void SetPlayImageSource(DependencyObject element, ImageSource value) => element.SetValue(PlayImageSourceProperty, value);
    public static ImageSource GetPlayImageSource(DependencyObject element) => (ImageSource)element.GetValue(PlayImageSourceProperty);
    /// <summary>
    /// 播放按钮边距
    /// </summary>
    public static readonly DependencyProperty PlayMarginProperty = DependencyProperty.RegisterAttached(
        "PlayMargin", typeof(Thickness), typeof(VideoOptAttach), new FrameworkPropertyMetadata(new Thickness(0, 0, 5, 0), FrameworkPropertyMetadataOptions.Inherits));
    public static void SetPlayMargin(DependencyObject element, Thickness value) => element.SetValue(PlayMarginProperty, value);
    public static Thickness GetPlayMargin(DependencyObject element) => (Thickness)element.GetValue(PlayMarginProperty);

    /// <summary>
    /// 暂停按钮图片
    /// </summary>
    public static readonly DependencyProperty PauseImageSourceProperty = DependencyProperty.RegisterAttached(
        "PauseImageSource", typeof(ImageSource), typeof(VideoOptAttach), new FrameworkPropertyMetadata(default(ImageSource), FrameworkPropertyMetadataOptions.Inherits));
    public static void SetPauseImageSource(DependencyObject element, ImageSource value) => element.SetValue(PauseImageSourceProperty, value);
    public static ImageSource GetPauseImageSource(DependencyObject element) => (ImageSource)element.GetValue(PauseImageSourceProperty);
    /// <summary>
    /// 暂停按钮边距
    /// </summary>
    public static readonly DependencyProperty PauseMarginProperty = DependencyProperty.RegisterAttached(
        "PauseMargin", typeof(Thickness), typeof(VideoOptAttach), new FrameworkPropertyMetadata(new Thickness(5, 0, 0, 0), FrameworkPropertyMetadataOptions.Inherits));
    public static void SetPauseMargin(DependencyObject element, Thickness value) => element.SetValue(PauseMarginProperty, value);
    public static Thickness GetPauseMargin(DependencyObject element) => (Thickness)element.GetValue(PauseMarginProperty);

    /// <summary>
    /// 停止按钮图片
    /// </summary>
    public static readonly DependencyProperty StopImageSourceProperty = DependencyProperty.RegisterAttached(
        "StopImageSource", typeof(ImageSource), typeof(VideoOptAttach), new FrameworkPropertyMetadata(default(ImageSource), FrameworkPropertyMetadataOptions.Inherits));
    public static void SetStopImageSource(DependencyObject element, ImageSource value) => element.SetValue(StopImageSourceProperty, value);
    public static ImageSource GetStopImageSource(DependencyObject element) => (ImageSource)element.GetValue(StopImageSourceProperty);
    /// <summary>
    /// 停止按钮边距
    /// </summary>
    public static readonly DependencyProperty StopMarginProperty = DependencyProperty.RegisterAttached(
        "StopMargin", typeof(Thickness), typeof(VideoOptAttach), new FrameworkPropertyMetadata(new Thickness(5, 0, 0, 0), FrameworkPropertyMetadataOptions.Inherits));
    public static void SetStopMargin(DependencyObject element, Thickness value) => element.SetValue(StopMarginProperty, value);
    public static Thickness GetStopMargin(DependencyObject element) => (Thickness)element.GetValue(StopMarginProperty);

}